<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var nowTime = new Date();
      year = nowTime.getFullYear();
      month = nowTime.getMonth() + 1;
      data1 = nowTime.getDate();
      day = nowTime.getDay();
      hour = nowTime.getHours();
      minute = nowTime.getMinutes();
      second = nowTime.getSeconds();
      document.write(
        "当前时间：" +
          year +
          "年" +
          month +
          "月" +
          data1 +
          "日" +
          "星期" +
          day +
          "  " +
          hour +
          ":" +
          minute +
          ":" +
          second
      );
    </script>
  </body>
</html>
